import request from '@/utils/request'

// 设备统计
export function deviceStatistics(data) {
  return request({
    url: '/bigScreen/deviceStatistics',
    method: 'post',
    data: data
  })
}

// 数据总览
export function dataOverview(data) {
  return request({
    url: '/bigScreen/dataOverview',
    method: 'post',
    data: data
  })
}

// 节能数据对比
export function energyData(data) {
  return request({
    url: '/bigScreen/energyData',
    method: 'post',
    data: data
  })
}

// 预警信息
export function warningInformation(data) {
  return request({
    url: '/bigScreen/warningInformation',
    method: 'post',
    data: data
  })
}

//指标统计
export function indexStatistics(data) {
  return request({
    url: `/bigScreen/indexStatistics?plotId=${data.plotId}`,
    method: 'get',
  })
}

//数据总览 （折线图）
export function lineChart(data) {
  return request({
    url: '/bigScreen/lineChart',
    method: 'post',
    data: data
  })
}

//预警分类
export function warnType(data) {
  return request({
    url: `/bigScreen/warnType?plotId=${data.plotId}`,
    method: 'get',
  })
}

//15天天气
export function getWeather(data) {
  return request({
    // url: `/bigScreen/getWeather?lat=${data.lat}&lon=${data.lon}`,
    url: `/bigScreen/getWeather?cityCode=${data.cityCode}`,
    method: 'get',
  })
}

//24小时天气
export function getRealTime(data) {
  return request({
    // url: `/bigScreen/getRealTime?lat=${data.lat}&lon=${data.lon}`,
    url: `/bigScreen/getRealTime?cityCode=${data.cityCode}`,
    method: 'get',
  })
}

//天气预警
export function weatherWarning(data) {
  return request({
    // url: `/bigScreen/weatherWarning?lat=${data.lat}&lon=${data.lon}`,
    url: `/bigScreen/weatherWarning?cityCode=${data.cityCode}`,
    method: 'get',
  })
}